/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package com.plian.system.entity.hr.recruitment;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.plian.Tools.DateUtil;
import com.plian.system.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
 * 实体类
 *
 * @author BladeX
 * @since 2019-12-02
 */
@Data
@TableName("hr_part_time_management")
@EqualsAndHashCode(callSuper = true)
public class PartTimeManagement extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 单据编码
     */
    @ApiModelProperty(value = "单据编码")
    private String code;
    /**
     * 人员主键
     */
    @ApiModelProperty(value = "人员主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long staffNameId;


    /**
     * 人员主键
     */
    @ApiModelProperty(value = "人员主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private String staffName;

    /**
     * 单位主键
     */
    @ApiModelProperty(value = "单位主键")
    private String companyNameId;

    /**
     * 性别id
     */
    @ApiModelProperty(value = "性别id")
    private String genderId;

    /**
     * 出生年月
     */
    @ApiModelProperty(value = "出生年月")
    private String birthday;
    /**
     * 年龄
     */
    @ApiModelProperty(value = "年龄")
    private String age;
    /**
     * 民族
     */
    @ApiModelProperty(value = "民族")
    private String nationId;
    /**
     * 籍贯
     */
    @ApiModelProperty(value = "籍贯")
    private String nativePlace;
    /**
     * 出生地
     */
    @ApiModelProperty(value = "出生地")
    private String birthPlace;
    /**
     * 入党时间
     */
    @ApiModelProperty(value = "入党时间")
    @DateTimeFormat(pattern = DateUtil.PATTERN_MONTH)
    @JsonFormat(pattern = DateUtil.PATTERN_MONTH)
    @TableField(value = "join_party_time", updateStrategy = FieldStrategy.IGNORED)
    private Date joinPartyTime;
    /**
     * 参加工作时间
     */
    @ApiModelProperty(value = "参加工作时间")
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    @JsonFormat(pattern = DateUtil.PATTERN_DATE)
    @TableField(value = "work_time", updateStrategy = FieldStrategy.IGNORED)
    private Date workTime;
    /**
     * 健康状况
     */
    @ApiModelProperty(value = "健康状况")
    private String healthConditionId;
    /**
     * 专业技术职务
     */
    @ApiModelProperty(value = "专业技术职务")
    private String technicalPosition;
    /**
     * 熟悉专业有何专长
     */
    @ApiModelProperty(value = "熟悉专业有何专长")
    private String expertise;
    /**
     * 全日制教育学历学位
     */
    @ApiModelProperty(value = "全日制教育学历学位")
    private String fulltimeDegree;
    /**
     * 全日制教育毕业院校系及专业
     */
    @ApiModelProperty(value = "全日制教育毕业院校专业")
    private String fulltimeSchoolMajor;

    /**
     * 在职教育学历学位
     */
    @ApiModelProperty(value = "在职教育学历学位")
    private String onjobDegree;

    /**
     * 在职教育毕业院校专业
     */
    @ApiModelProperty(value = "在职教育毕业院校专业")
    private String onjobSchoolMajor;


    /**
     * 现任职务
     */
    @ApiModelProperty(value = "现任职务")
    private String presentPostId;

    /**
     * 简历
     */
    @ApiModelProperty(value = "简历")
    private String resume;

    /**
     * 已兼职情况
     */
    @ApiModelProperty(value = "已兼职情况")
    private String partTimeJobSituation;

    /**
     * 组织部处理现状
     */
    @ApiModelProperty(value = "组织部处理现状")
    private String processingStatus;

    /**
     * 管理级别
     */
    @ApiModelProperty(value = "管理级别")
    private String managementCategoryId;


    /**
     * 版本号
     */
    private String version;
    /**
     * 乐观锁字段
     */
    private Integer tsVersion;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     * 审批人
     */
    @ApiModelProperty(value = "审批人")
    private String approvedUser;
    /**
     * 审批时间
     */
    @ApiModelProperty(value = "审批时间")
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    private Date approvedTime;
    /**
     * 审批意见
     */
    @ApiModelProperty(value = "审批意见")
    private String approvedOpinion;

    /**
     * 变更时间
     */
    @ApiModelProperty(value = "变更时间")
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    private Date changeDateTime;


    /**
     * 填报时间
     */
    @ApiModelProperty(value = "填报时间")
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    @JsonFormat(pattern = DateUtil.PATTERN_DATE)
    private Date fillingDateTime;


    /**
     * 编号
     */
    @ApiModelProperty(value = "编号")
    private String filingCode;

    /**
     * 流程表单类型
     */
    @ApiModelProperty(value = "流程表单类型")
    private String formType;

    /**
     * 兼职信息集合
     */
    @ApiModelProperty(value = "兼职信息集合")
    @TableField(exist = false)
    private List<PartTimeInfo> partTimeInfos;


    @ApiModelProperty(value = "拟兼职信息集合")
    @TableField(exist = false)
    public List<PartTimeInfo> njzPartTimeInfos;

    /**
     * 附件信息
     */
    @ApiModelProperty(value = "附件信息")
    @TableField(exist = false)
    private List<HashMap> docList;

    /**
     * pdf预览时type 1 企业审批表 2 企业审批表
     */
    @ApiModelProperty(value = "pdf预览时type 1 企业审批表 2 企业审批表")
    @TableField(exist = false)
    private Integer type;

    /**
     * 数据来源id
     */
    @ApiModelProperty(value = "数据来源id", required = true)
    private String dataSourceId;

    /**
     * 数据来源id
     */
    @ApiModelProperty(value = "数据来源 null为系统填报 对应用户id")
    private String dataSource;
}
